package com.yds.bluetooth.views

import android.bluetooth.BluetoothDevice

/**
 * 蓝牙助手对外开放功能
 */
interface OnBluetoothFunctionsListener {

    /* 开始扫描蓝牙设备 */
    fun onScanDeviceStart(autoStop: Boolean = false, showAnim: Boolean = true, nameCanEmpty: Boolean = false, scanBleOnly: Boolean = false)

    /* 结束扫描蓝牙设备 */
    fun onScanDeviceStop()

    /* 连接状态发生变化 */
    fun onConnectStateChanged(enable: Boolean)

    /* 连接到蓝牙设备 */
    fun onConnectToBluetoothDevice(resultCallback: (Boolean, BluetoothDevice) -> Unit)

    /* 发送数据到蓝牙设备 */
    fun sendDataToBluetoothDevice(data: ByteArray, sendResultCallback: (Boolean) -> Unit, receiveResultCallback: (ByteArray) -> Unit)

    /* 断开与蓝牙设备的连接 */
    fun onDisconnectFromBluetoothDevice()

}